﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年1月14日
//类描述：实体类 BdNews (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年1月14日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.Rights.Model
{
    /// <summary>
    /// 实体类 BdNews (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "BdNews", PrimaryKey = "News_ID", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class BdNewsInfo : BaseModel
    {
        public BdNewsInfo()
        {            
            PrimaryKey = "News_ID"; 
			Fields.Add("News_ID");//News_ID
			Fields.Add("NewsTitle");//NewsTitle
			Fields.Add("Contents");//Contents
			Fields.Add("IsPublish");//IsPublish
			Fields.Add("IsHeaderLine");//IsHeaderLine
			Fields.Add("Remark");//Remark
			Fields.Add("CreateDate");//CreateDate
			Fields.Add("NewsSource");//NewsSource
			Fields.Add("NewsEditor");//NewsEditor
			Fields.Add("HtmlName");//HtmlName
			Fields.Add("PublishDate");//PublishDate
			Fields.Add("IsCheck");//IsCheck
			Fields.Add("IsPhoto");//IsPhoto
			Fields.Add("KeyWord");//KeyWord
			Fields.Add("NewsClass_ID");//NewsClass_ID
			Fields.Add("Class_ID");//Class_ID
			Fields.Add("ViewCount");//ViewCount
			Fields.Add("IsCommand");//IsCommand
			Fields.Add("HostName");//HostName
            Fields.Add("ID");//ID
			
			
			CanNotNullFields.Add("News_ID");//News_ID不能为空!				
			this.OnCreated();			
			this.OnModelCreated();
        }
		public BdNewsInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
        }
        #endregion 
		
		#region 成员变量
				
		private Guid _News_ID;//News_ID
		private string _NewsTitle;//NewsTitle
		private string _Contents;//Contents
		private bool? _IsPublish;//IsPublish
		private bool? _IsHeaderLine;//IsHeaderLine
		private string _Remark;//Remark
		private DateTime? _CreateDate;//CreateDate
		private string _NewsSource;//NewsSource
		private string _NewsEditor;//NewsEditor
		private string _HtmlName;//HtmlName
		private DateTime? _PublishDate;//PublishDate
		private bool? _IsCheck;//IsCheck
		private bool? _IsPhoto;//IsPhoto
		private string _KeyWord;//KeyWord
		private string _NewsClass_ID;//NewsClass_ID
		private string _Class_ID;//Class_ID
		private int? _ViewCount;//ViewCount
		private bool? _IsCommand;//IsCommand
		private string _HostName;//HostName
        private int? _ID;//ViewCount
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// News_ID
        /// </summary>       
		[ModelField(Description = "News_ID", Type = typeof(Guid), ErrorMessage = "News_ID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 16,  DbType = "uniqueidentifier", IsNeedRecordModify = true)]
        public virtual Guid News_ID
        {
            get
            {
                return this._News_ID;
            }
            set
            {
                if (_News_ID != value || (_News_ID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "News_ID", _News_ID, value, "uniqueidentifier", "News_ID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnNews_IDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._News_ID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnNews_IDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _News_ID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// NewsTitle
        /// </summary>       
		[ModelField(Description = "NewsTitle", Type = typeof(string), ErrorMessage = "NewsTitle信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 200,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string NewsTitle
        {
            get
            {
                return this._NewsTitle;
            }
            set
            {
                if (_NewsTitle != value || (_NewsTitle == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "NewsTitle", _NewsTitle, value, "nvarchar", "NewsTitle");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnNewsTitleChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._NewsTitle = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnNewsTitleChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _NewsTitle = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// Contents
        /// </summary>       
		[ModelField(Description = "Contents", Type = typeof(string), ErrorMessage = "Contents信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 16,  DbType = "text", IsNeedRecordModify = true)]
        public virtual string Contents
        {
            get
            {
                return this._Contents;
            }
            set
            {
                if (_Contents != value || (_Contents == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "Contents", _Contents, value, "text", "Contents");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnContentsChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Contents = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnContentsChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Contents = value;
                    }
                }
            }
        }

        /// <summary>
        /// Contents
        /// </summary>       
        [ModelField(Description = "ID", Type = typeof(string), ErrorMessage = "ID信息错误!", FieldType = FieldType.Normal, IsKeyField = false, IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 16, DbType = "text", IsNeedRecordModify = true)]
        public virtual int? ID
        {
            get
            {
                return this._ID;
            }
            set
            {
                if (_ID != value || (_ID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "ID", _ID, value, "text", "ID");
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);
                    }
                    else
                    {
                        _ID = value;
                    }
                }
            }
        }

		/// <summary>
        /// IsPublish
        /// </summary>       
		[ModelField(Description = "IsPublish", Type = typeof(bool?), ErrorMessage = "IsPublish信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsPublish
        {
            get
            {
                return this._IsPublish;
            }
            set
            {
                if (_IsPublish != value || (_IsPublish == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "IsPublish", _IsPublish, value, "bit", "IsPublish");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsPublishChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsPublish = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsPublishChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsPublish = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IsHeaderLine
        /// </summary>       
		[ModelField(Description = "IsHeaderLine", Type = typeof(bool?), ErrorMessage = "IsHeaderLine信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsHeaderLine
        {
            get
            {
                return this._IsHeaderLine;
            }
            set
            {
                if (_IsHeaderLine != value || (_IsHeaderLine == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "IsHeaderLine", _IsHeaderLine, value, "bit", "IsHeaderLine");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsHeaderLineChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsHeaderLine = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsHeaderLineChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsHeaderLine = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// Remark
        /// </summary>       
		[ModelField(Description = "Remark", Type = typeof(string), ErrorMessage = "Remark信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1000,  DbType = "nchar", IsNeedRecordModify = true)]
        public virtual string Remark
        {
            get
            {
                return this._Remark;
            }
            set
            {
                if (_Remark != value || (_Remark == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "Remark", _Remark, value, "nchar", "Remark");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnRemarkChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Remark = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnRemarkChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Remark = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// CreateDate
        /// </summary>       
		[ModelField(Description = "CreateDate", Type = typeof(DateTime?), ErrorMessage = "CreateDate信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? CreateDate
        {
            get
            {
                return this._CreateDate;
            }
            set
            {
                if (_CreateDate != value || (_CreateDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "CreateDate", _CreateDate, value, "datetime", "CreateDate");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnCreateDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._CreateDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnCreateDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _CreateDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// NewsSource
        /// </summary>       
		[ModelField(Description = "NewsSource", Type = typeof(string), ErrorMessage = "NewsSource信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string NewsSource
        {
            get
            {
                return this._NewsSource;
            }
            set
            {
                if (_NewsSource != value || (_NewsSource == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "NewsSource", _NewsSource, value, "nvarchar", "NewsSource");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnNewsSourceChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._NewsSource = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnNewsSourceChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _NewsSource = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// NewsEditor
        /// </summary>       
		[ModelField(Description = "NewsEditor", Type = typeof(string), ErrorMessage = "NewsEditor信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string NewsEditor
        {
            get
            {
                return this._NewsEditor;
            }
            set
            {
                if (_NewsEditor != value || (_NewsEditor == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "NewsEditor", _NewsEditor, value, "nvarchar", "NewsEditor");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnNewsEditorChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._NewsEditor = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnNewsEditorChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _NewsEditor = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// HtmlName
        /// </summary>       
		[ModelField(Description = "HtmlName", Type = typeof(string), ErrorMessage = "HtmlName信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 200,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string HtmlName
        {
            get
            {
                return this._HtmlName;
            }
            set
            {
                if (_HtmlName != value || (_HtmlName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "HtmlName", _HtmlName, value, "nvarchar", "HtmlName");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnHtmlNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._HtmlName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnHtmlNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _HtmlName = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// PublishDate
        /// </summary>       
		[ModelField(Description = "PublishDate", Type = typeof(DateTime?), ErrorMessage = "PublishDate信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? PublishDate
        {
            get
            {
                return this._PublishDate;
            }
            set
            {
                if (_PublishDate != value || (_PublishDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "PublishDate", _PublishDate, value, "datetime", "PublishDate");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnPublishDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._PublishDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnPublishDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _PublishDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IsCheck
        /// </summary>       
		[ModelField(Description = "IsCheck", Type = typeof(bool?), ErrorMessage = "IsCheck信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsCheck
        {
            get
            {
                return this._IsCheck;
            }
            set
            {
                if (_IsCheck != value || (_IsCheck == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "IsCheck", _IsCheck, value, "bit", "IsCheck");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsCheckChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsCheck = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsCheckChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsCheck = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IsPhoto
        /// </summary>       
		[ModelField(Description = "IsPhoto", Type = typeof(bool?), ErrorMessage = "IsPhoto信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsPhoto
        {
            get
            {
                return this._IsPhoto;
            }
            set
            {
                if (_IsPhoto != value || (_IsPhoto == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "IsPhoto", _IsPhoto, value, "bit", "IsPhoto");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsPhotoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsPhoto = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsPhotoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsPhoto = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// KeyWord
        /// </summary>       
		[ModelField(Description = "KeyWord", Type = typeof(string), ErrorMessage = "KeyWord信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 200,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string KeyWord
        {
            get
            {
                return this._KeyWord;
            }
            set
            {
                if (_KeyWord != value || (_KeyWord == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "KeyWord", _KeyWord, value, "nvarchar", "KeyWord");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnKeyWordChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._KeyWord = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnKeyWordChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _KeyWord = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// NewsClass_ID
        /// </summary>       
		[ModelField(Description = "NewsClass_ID", Type = typeof(string), ErrorMessage = "NewsClass_ID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 36,  DbType = "char", IsNeedRecordModify = true)]
        public virtual string NewsClass_ID
        {
            get
            {
                return this._NewsClass_ID;
            }
            set
            {
                if (_NewsClass_ID != value || (_NewsClass_ID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "NewsClass_ID", _NewsClass_ID, value, "char", "NewsClass_ID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnNewsClass_IDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._NewsClass_ID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnNewsClass_IDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _NewsClass_ID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// Class_ID
        /// </summary>       
		[ModelField(Description = "Class_ID", Type = typeof(string), ErrorMessage = "Class_ID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 36,  DbType = "char", IsNeedRecordModify = true)]
        public virtual string Class_ID
        {
            get
            {
                return this._Class_ID;
            }
            set
            {
                if (_Class_ID != value || (_Class_ID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "Class_ID", _Class_ID, value, "char", "Class_ID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnClass_IDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Class_ID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnClass_IDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Class_ID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// ViewCount
        /// </summary>       
		[ModelField(Description = "ViewCount", Type = typeof(int?), ErrorMessage = "ViewCount信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 4,  DbType = "int", IsNeedRecordModify = true)]
        public virtual int? ViewCount
        {
            get
            {
                return this._ViewCount;
            }
            set
            {
                if (_ViewCount != value || (_ViewCount == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "ViewCount", _ViewCount, value, "int", "ViewCount");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnViewCountChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ViewCount = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnViewCountChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _ViewCount = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IsCommand
        /// </summary>       
		[ModelField(Description = "IsCommand", Type = typeof(bool?), ErrorMessage = "IsCommand信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsCommand
        {
            get
            {
                return this._IsCommand;
            }
            set
            {
                if (_IsCommand != value || (_IsCommand == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "IsCommand", _IsCommand, value, "bit", "IsCommand");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsCommandChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsCommand = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsCommandChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsCommand = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// HostName
        /// </summary>       
		[ModelField(Description = "HostName", Type = typeof(string), ErrorMessage = "HostName信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 100,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string HostName
        {
            get
            {
                return this._HostName;
            }
            set
            {
                if (_HostName != value || (_HostName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("BdNews", "HostName", _HostName, value, "varchar", "HostName");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnHostNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._HostName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnHostNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _HostName = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnNews_IDChanging(ModifyInfo modifyInfo);//News_IDNews_ID改变之前发生
        partial void OnNews_IDChanged(ModifyInfo modifyInfo);//News_IDNews_ID改变之后发生
		partial void OnNewsTitleChanging(ModifyInfo modifyInfo);//NewsTitleNewsTitle改变之前发生
        partial void OnNewsTitleChanged(ModifyInfo modifyInfo);//NewsTitleNewsTitle改变之后发生
		partial void OnContentsChanging(ModifyInfo modifyInfo);//ContentsContents改变之前发生
        partial void OnContentsChanged(ModifyInfo modifyInfo);//ContentsContents改变之后发生
		partial void OnIsPublishChanging(ModifyInfo modifyInfo);//IsPublishIsPublish改变之前发生
        partial void OnIsPublishChanged(ModifyInfo modifyInfo);//IsPublishIsPublish改变之后发生
		partial void OnIsHeaderLineChanging(ModifyInfo modifyInfo);//IsHeaderLineIsHeaderLine改变之前发生
        partial void OnIsHeaderLineChanged(ModifyInfo modifyInfo);//IsHeaderLineIsHeaderLine改变之后发生
		partial void OnRemarkChanging(ModifyInfo modifyInfo);//RemarkRemark改变之前发生
        partial void OnRemarkChanged(ModifyInfo modifyInfo);//RemarkRemark改变之后发生
		partial void OnCreateDateChanging(ModifyInfo modifyInfo);//CreateDateCreateDate改变之前发生
        partial void OnCreateDateChanged(ModifyInfo modifyInfo);//CreateDateCreateDate改变之后发生
		partial void OnNewsSourceChanging(ModifyInfo modifyInfo);//NewsSourceNewsSource改变之前发生
        partial void OnNewsSourceChanged(ModifyInfo modifyInfo);//NewsSourceNewsSource改变之后发生
		partial void OnNewsEditorChanging(ModifyInfo modifyInfo);//NewsEditorNewsEditor改变之前发生
        partial void OnNewsEditorChanged(ModifyInfo modifyInfo);//NewsEditorNewsEditor改变之后发生
		partial void OnHtmlNameChanging(ModifyInfo modifyInfo);//HtmlNameHtmlName改变之前发生
        partial void OnHtmlNameChanged(ModifyInfo modifyInfo);//HtmlNameHtmlName改变之后发生
		partial void OnPublishDateChanging(ModifyInfo modifyInfo);//PublishDatePublishDate改变之前发生
        partial void OnPublishDateChanged(ModifyInfo modifyInfo);//PublishDatePublishDate改变之后发生
		partial void OnIsCheckChanging(ModifyInfo modifyInfo);//IsCheckIsCheck改变之前发生
        partial void OnIsCheckChanged(ModifyInfo modifyInfo);//IsCheckIsCheck改变之后发生
		partial void OnIsPhotoChanging(ModifyInfo modifyInfo);//IsPhotoIsPhoto改变之前发生
        partial void OnIsPhotoChanged(ModifyInfo modifyInfo);//IsPhotoIsPhoto改变之后发生
		partial void OnKeyWordChanging(ModifyInfo modifyInfo);//KeyWordKeyWord改变之前发生
        partial void OnKeyWordChanged(ModifyInfo modifyInfo);//KeyWordKeyWord改变之后发生
		partial void OnNewsClass_IDChanging(ModifyInfo modifyInfo);//NewsClass_IDNewsClass_ID改变之前发生
        partial void OnNewsClass_IDChanged(ModifyInfo modifyInfo);//NewsClass_IDNewsClass_ID改变之后发生
		partial void OnClass_IDChanging(ModifyInfo modifyInfo);//Class_IDClass_ID改变之前发生
        partial void OnClass_IDChanged(ModifyInfo modifyInfo);//Class_IDClass_ID改变之后发生
		partial void OnViewCountChanging(ModifyInfo modifyInfo);//ViewCountViewCount改变之前发生
        partial void OnViewCountChanged(ModifyInfo modifyInfo);//ViewCountViewCount改变之后发生
		partial void OnIsCommandChanging(ModifyInfo modifyInfo);//IsCommandIsCommand改变之前发生
        partial void OnIsCommandChanged(ModifyInfo modifyInfo);//IsCommandIsCommand改变之后发生
		partial void OnHostNameChanging(ModifyInfo modifyInfo);//HostNameHostName改变之前发生
        partial void OnHostNameChanged(ModifyInfo modifyInfo);//HostNameHostName改变之后发生
        partial void OnIDChanging(ModifyInfo modifyInfo);//ID改变之前发生
        partial void OnIDChanged(ModifyInfo modifyInfo);//ID改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();
            DetailURI = ZModel.InitDetailURI("BdNews", "News_ID", News_ID);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("BdNews", "News_ID", News_ID);
            ManageEditURI = ZModel.InitMEditURI("BdNews", "News_ID", News_ID);
            ManageDetailURI = ZModel.InitMDetailURI("BdNews", "News_ID", News_ID);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}